Skip to content

[XPTI] Emit metadata to sycl stream based on requested detail level#21865

Merged
againull merged 5 commits intosyclfrom
againull/sycl_xpti_stream_detail_level
Apr 29, 2026
Merged

[XPTI] Emit metadata to sycl stream based on requested detail level#21865
againull merged 5 commits intosyclfrom
againull/sycl_xpti_stream_detail_level

Conversation

@againull
Copy link
Copy Markdown
Contributor

Take into account subscriber requested detail level when emitting metadata into the "sycl" stream. Add metadata table showing which detail level provides each field.

Existing tools using sycl or sycl.debug continue to work unchanged. Optionally tools can request BASIC level for minimal overhead (PTI use case).

Depends on #21863

Introduces a mechanism for subscribers to request different levels of
optional data emission from producers on a per-stream basis, enabling
fine-grained control over tracing overhead:

- Added stream_detail_level_t enum (NONE, BASIC, NORMAL, VERBOSE)
- Added optional xptiQuerySubscriberStreamDetailLevel subscriber callback
- Added xptiGetEffectiveStreamDetailLevel producer API
- Aggregation rule: effective level = max across all subscribers

Producers can use threshold checks to conditionally emit expensive optional
data based on the effective detail level.

Also add XPTI_HAS_STREAM_DETAIL_LEVEL macro to enable compile-time
feature detection for stream detail level functionality.

This approach allows to stay fully backward compatible: subscribers
that define new xptiQuerySubscriberStreamDetailLevel callback can work
with both old frameworks (that will ignore the callback) and new
frameworks (that will recognize the callback).

Assisted-By: Claude Sonnet 4.5
Take into account requested detail level when emitting metadata into
the "sycl" stream. Add metadata table showing which detail level
provides each field.

Existing tools using sycl or sycl.debug continue to work unchanged
Optionally tools can request BASIC level for minimal overhead (PTI use case).
@againull againull requested a review from tovinkere April 23, 2026 21:02
@againull againull requested a review from a team as a code owner April 23, 2026 21:02
@againull againull requested review from sergey-semenov and removed request for a team April 23, 2026 21:02
Comment thread sycl/source/detail/scheduler/commands.cpp Outdated
Comment thread sycl/source/detail/scheduler/commands.cpp
@againull againull requested a review from tovinkere April 28, 2026 20:09
Comment thread sycl/source/detail/queue_impl.cpp
Comment thread sycl/source/detail/queue_impl.cpp
Comment thread sycl/source/detail/queue_impl.cpp
Comment thread sycl/source/detail/scheduler/commands.cpp
@againull againull requested a review from tovinkere April 28, 2026 20:31
Copy link
Copy Markdown
Contributor

@tovinkere tovinkere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@againull againull changed the base branch from againull/xpti_stream_detail_level to sycl April 29, 2026 16:20
@againull againull merged commit 9cce0d9 into sycl Apr 29, 2026
31 of 32 checks passed
@againull againull deleted the againull/sycl_xpti_stream_detail_level branch April 29, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants